import request from '@/utils/request'

export default {
    // 获取景点信息
    getScenicList(page, size, searchScenic) {
        return request({
            // url: '/eduservice/study-teacher/pageTeacherWrapper/'+current+'/'+size,
            url: `/scenic/spot/getSpotList/${page}/${size}`,
            method: 'post',
            data: searchScenic
        })
    },
    //根据id删除景点deleteScenicSpot
    deleteScenicById(id) {
        return request({
            url: `/scenic/spot/deleteScenicSpot/${id}`,
            method: 'delete'
        })
    },
    //根据id查询景点详细信息
    getScenicInfoById(id){
        return request({
            url: `/scenic/spot/getScenicSpotAllInfo/${id}`,
            method: 'get'
        })
    },
    //根据id修改景点信息
    updateScenicSpot(scenicInfo){
        return request({
            url: `/scenic/spot/updateScenicSpot`,
            method: 'post',
            data: scenicInfo
        })
    },
    //根据id修改图片信息
    updateScenicSpotImg(id,status,spotImg){
        return request({
            url: `/scenic/img/updateScenicSpotImg`,
            method: 'post',
            data:{
                id: id,
                status: status,
                spotImg: spotImg
            }
        })
    },
    //根据景点id新增图片
    addScenicSpotImg(data){
        return request({
            url: `/scenic/img/addScenicSpotImg`,
            method: 'post',
            data: data
        })
    },
    //根据id删除景点图片
    deleteScenicImgById(id){
        return request({
            url:`/scenic/img/deleteScenicImgById/${id}`,
            method: 'delete'
        })
    }
}